Skip to main content

Get Student

Description#

Return student record.

Method#

GET

Endpoint#

/admin/api.php?f=getStudent&id={student id}

Header#

Content-Type: application/x-www-form-urlencoded

Body#

Not Applicable

Response#

Success#
{
result: "success", //String
content: [
{
id: int,
userid: int,
username: string,
email: string,
mobile: int,
firstname: string,
lastname: string,
gradelevel: int,
schoolname: string,
preferences: string,
points: int
}
]
}
Fail#
{
result: "fail" //String
}

Example#

Javascript#

POST Request#
const students = async () => {
const response = await fetch('http://stockknowledge.org/admin/api.php?f=getStudent&id=2',{
method: 'POST',
body: 'id=4',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
});
return await response.json();
}